
import { request } from "@/utils/http"

const getUserInfo = (params) => {
    return request({
        url:'/api/userInfo',
        method:'GET',
        params
    })
}

const getUserArticle = (params) => {
    return request({
        url:'/api/userArticle',
        method:'GET',
        params
    })
}
const getCollectArticle = (params) => {
    return request({
        url:'/api/myCollectArticlePage',
        method:'GET',
        params
    })
}

const putUserInfo = (data) => {
    return request({
        method:'PUT',
        url:'/api/userInfo',
        data
    })
}

const resetPwd = (data) => {
    return request({
        method:'PUT',
        url:'/api/resetPwd',
        data
    })
}

const commntMy = (params) => {
    return request({
        method:'get',
        url:'/api/commntMy',
        params
    })
}
const replyMy = (params) => {
    return request({
        method:'get',
        url:'/api/replyMy',
        params
    })
}

const delMyArticle = (id) => {
    return request({
        url:`/api/article/${id}`,
        method:'DELETE',
    })
}
export {
    getUserInfo,getUserArticle,putUserInfo,resetPwd,commntMy,replyMy,getCollectArticle,delMyArticle
}